<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<c:choose>
    <c:when test="${sessionScope.isAdmin!=true}">
        <%
            response.setStatus(response.SC_MOVED_TEMPORARILY);
            response.setHeader("Location", "/");
        %>
    </c:when>
    <c:otherwise>
        <html>
        <head>
            <title>Title</title>
            <script src="http://code.jquery.com/jquery-1.12.4.min.js"></script>
            <script type="text/javascript">
                function jump() {
                    window.location.href = 'goodsAll.jsp';
                }
            </script>
        </head>
        <body>
        <form action="/addGoods">
            input name here<br/>
            <input type="text" name="goods_name" required/><br/><br/>
            input picture's address here<br/>
            <input type="text" name="picture" required/><br/><br/>
            input price here<br/>
            <input type="text" name="price" required/><br/><br/>
            <select style="WIDTH: 90px" name="type_id" required/>
            <option selected hidden disable value="0">check type here</option>
            <option value="1">耳机</option>
            <option value="2">手机</option>
            <option value="3">电脑</option>
            <option value="4">平板</option>
            </select><br/><br/>
            input detail here<br/>
            <textarea name="detail" cols="30" rows="10" required></textarea><br/><br/>
            <input type="submit" value="提交">
            <input type="button" value="取消" onclick=jump()>
        </form>
        </body>
        </html>
    </c:otherwise>
</c:choose>